Try replacing your second line with:
ThisEndDate = ThisEndDate.toDateString();
toDateString() is the javascript method to return just the date formatted as a string.
If the format's not exactly right, you can use other methods of the javascript date object. There's a list of them here: http://www.w3schools.com/jsref/jsref_obj_date.asp